home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4573 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: access.mbnet.mb.ca!natewild
  2. From: natewild@mbnet.mb.ca (Nathan T. Wild)
  3. Newsgroups: comp.lang.c,comp.lang.c++,comp.os.msdos.programmer
  4. Subject: Device Drivers
  5. Date: 30 Jan 1996 21:22:33 GMT
  6. Organization: The University of Manitoba
  7. Message-ID: <4em26p$el1@canopus.cc.umanitoba.ca>
  8. NNTP-Posting-Host: access.mbnet.mb.ca
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. I would like to be able to make device drivers in C. I writing an
  12. application which uses loadable modules for some of it's functions.  
  13.  
  14. Currently these functions are written in Assembly language.  The
  15. assembled executable code is stripped of it's EXE header and the
  16. contents is written directly to memory...  Then a function pointer is
  17. set to point to this code.
  18.  
  19. This works...  But how can I go about generating these executable
  20. "driver" files in C, rather than assembly language?  In order to link my
  21. C code, I need a main()?
  22.  
  23. Can this be done?  Can somebody explain how to do it?
  24.  
  25. I actually want a C++ class to load these modules in from it's
  26. constructor, but I am currently stuck writing everything in assembly
  27. language? 
  28.  
  29. Does anyone know how to translate the object-code generated by the C
  30. compiler into raw executable code for loading as a device driver in this
  31. manner?
  32.  
  33. I am using DOS and Borland C++, but that shouldn't really matter...
  34.  
  35.  
  36.  
  37. Please respond via email, as I do not have live access to this group.
  38. If I get a collection of good responses, I will post a follow-up to
  39. comp.os.msdos.programmer, comp.lang.c and comp.lang.c++
  40.